home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1995-07-24 | 5.5 KB | [TEXT/MPCC] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Mon Jul 24 17:34:55 1995, modified Mon Jul 24 17:34:55 1995, creator 'MPCC', type ASCII, 4978 bytes "PrepMemoryUtilities.c" , at 0x13f2 410 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MPCC] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 15 50 72 65 70 4d 65 | 6d 6f 72 79 55 74 69 6c |..PrepMe|moryUtil|
|00000010| 69 74 69 65 73 2e 63 00 | 00 00 00 00 00 00 00 00 |ities.c.|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 43 | 43 01 00 00 00 00 00 00 |.TEXTMPC|C.......|
|00000050| 00 00 00 00 00 13 72 00 | 00 01 9a ac 39 c2 7f ac |......r.|....9...|
|00000060| 39 c2 7f 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |9.......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 55 4b 00 00 |........|....UK..|
|00000080| 2f 2a 09 09 09 09 09 09 | 09 09 50 72 65 70 4d 65 |/*......|..PrepMe|
|00000090| 6d 6f 72 79 55 74 69 6c | 69 74 69 65 73 2e 63 09 |moryUtil|ities.c.|
|000000a0| 09 09 09 09 09 09 09 2a | 2f 0d 2f 2a 0d 20 2a 20 |.......*|/./*. * |
|000000b0| 50 72 65 70 4d 65 6d 6f | 72 79 55 74 69 6c 69 74 |PrepMemo|ryUtilit|
|000000c0| 69 65 73 2e 63 0d 20 2a | 20 43 6f 70 79 72 69 67 |ies.c. *| Copyrig|
|000000d0| 68 74 20 a9 20 31 39 39 | 34 2d 39 35 20 41 70 70 |ht . 199|4-95 App|
|000000e0| 6c 65 20 43 6f 6d 70 75 | 74 65 72 20 49 6e 63 2e |le Compu|ter Inc.|
|000000f0| 20 41 6c 6c 20 72 69 67 | 68 74 73 20 72 65 73 65 | All rig|hts rese|
|00000100| 72 76 65 64 2e 0d 20 2a | 2f 0d 2f 2a 09 2e 5f 5f |rved.. *|/./*..__|
|00000110| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00000120| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00000130| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00000140| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00000150| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00000160| 5f 2e 0d 20 20 09 7c 20 | 54 68 65 73 65 20 72 6f |_.. .| |These ro|
|00000170| 75 74 69 6e 65 73 20 73 | 69 6d 70 6c 69 66 79 20 |utines s|implify |
|00000180| 74 68 65 20 63 6f 6d 70 | 75 74 61 74 69 6f 6e 73 |the comp|utations|
|00000190| 20 6e 65 65 64 65 64 20 | 66 6f 72 20 50 72 65 70 | needed |for Prep|
|000001a0| 61 72 65 4d 65 6d 6f 72 | 79 46 6f 72 49 4f 2e 20 |areMemor|yForIO. |
|000001b0| 54 68 65 79 09 09 7c 0d | 20 20 09 7c 20 61 72 65 |They..|.| .| are|
|000001c0| 20 6e 6f 74 20 73 70 65 | 63 69 66 69 63 20 74 6f | not spe|cific to|
|000001d0| 20 74 68 65 20 66 72 61 | 6d 65 77 6f 72 6b 20 64 | the fra|mework d|
|000001e0| 72 69 76 65 72 2e 09 09 | 09 09 09 09 09 09 09 09 |river...|........|
|000001f0| 09 7c 0d 20 20 09 7c 09 | 09 09 09 09 09 09 09 09 |.|. .|.|........|
|00000200| 09 09 09 09 09 09 09 09 | 09 09 09 09 7c 0d 20 20 |........|....|. |
|00000210| 09 7c 09 43 68 65 63 6b | 70 6f 69 6e 74 49 4f 54 |.|.Check|pointIOT|
|00000220| 61 62 6c 65 09 09 43 61 | 6c 6c 20 43 68 65 63 6b |able..Ca|ll Check|
|00000230| 70 6f 69 6e 74 49 4f 20 | 66 6f 72 20 74 68 65 20 |pointIO |for the |
|00000240| 73 70 65 63 69 66 69 65 | 64 20 49 4f 50 72 65 70 |specifie|d IOPrep|
|00000250| 61 72 61 74 69 6f 6e 54 | 61 62 6c 65 09 7c 0d 20 |arationT|able.|. |
|00000260| 20 09 7c 09 09 09 09 09 | 09 09 43 6f 6d 70 61 72 | .|.....|..Compar|
|00000270| 65 41 6e 64 53 77 61 70 | 20 69 73 20 75 73 65 64 |eAndSwap| is used|
|00000280| 20 74 6f 20 65 6e 73 75 | 72 65 20 74 68 61 74 20 | to ensu|re that |
|00000290| 43 68 65 63 6b 70 6f 69 | 6e 74 49 4f 09 09 7c 0d |Checkpoi|ntIO..|.|
|000002a0| 20 20 09 7c 09 09 09 09 | 09 09 09 69 73 20 63 61 | .|....|...is ca|
|000002b0| 6c 6c 65 64 20 6f 6e 63 | 65 20 6f 6e 6c 79 20 2d |lled onc|e only -|
|000002c0| 2d 20 74 68 69 73 20 69 | 73 20 70 72 6f 62 61 62 |- this i|s probab|
|000002d0| 6c 79 20 6f 76 65 72 6b | 69 6c 6c 09 09 7c 0d 20 |ly overk|ill..|. |
|000002e0| 20 09 7c 09 43 68 65 63 | 6b 46 6f 72 43 6f 6e 74 | .|.Chec|kForCont|
|000002f0| 69 67 75 6f 75 73 50 68 | 79 73 69 63 61 6c 4d 61 |iguousPh|ysicalMa|
|00000300| 70 70 69 6e 67 09 53 63 | 61 6e 20 61 20 70 68 79 |pping.Sc|an a phy|
|00000310| 73 69 63 61 6c 20 6d 61 | 70 70 69 6e 67 20 74 61 |sical ma|pping ta|
|00000320| 62 6c 65 20 74 6f 20 65 | 6e 73 75 72 65 09 09 7c |ble to e|nsure..||
|00000330| 0d 20 20 09 7c 09 09 09 | 09 09 09 09 74 68 61 74 |. .|...|....that|
|00000340| 20 74 68 65 20 65 6e 74 | 69 72 65 20 61 72 65 61 | the ent|ire area|
|00000350| 20 69 73 20 70 68 79 73 | 69 63 61 6c 6c 79 20 63 | is phys|ically c|
|00000360| 6f 6e 74 69 67 75 6f 75 | 73 2e 20 53 69 6e 63 65 |ontiguou|s. Since|
|00000370| 09 7c 0d 20 20 09 7c 09 | 09 09 09 09 09 09 74 68 |.|. .|.|......th|
|00000380| 65 20 64 72 69 76 65 72 | 20 63 61 6e 20 63 61 6c |e driver| can cal|
|00000390| 6c 20 4d 65 6d 41 6c 6c | 6f 63 61 74 65 50 68 79 |l MemAll|ocatePhy|
|000003a0| 73 69 63 61 6c 6c 79 43 | 6f 6e 74 69 67 75 6f 75 |sicallyC|ontiguou|
|000003b0| 73 2c 09 7c 0d 20 20 09 | 7c 09 09 09 09 09 09 09 |s,.|. .||.......|
|000003c0| 74 68 69 73 20 69 73 6e | 27 74 20 72 65 61 6c 6c |this isn|'t reall|
|000003d0| 79 20 6e 65 65 64 65 64 | 20 61 6e 79 6d 6f 72 65 |y needed| anymore|
|000003e0| 2e 09 09 09 09 09 09 7c | 0d 20 20 09 7c 09 4e 65 |.......||. .|.Ne|
|000003f0| 78 74 50 61 67 65 49 73 | 43 6f 6e 74 69 67 75 6f |xtPageIs|Contiguo|
|00000400| 75 73 09 52 65 74 75 72 | 6e 20 54 52 55 45 20 69 |us.Retur|n TRUE i|
|00000410| 66 20 74 68 65 20 70 61 | 67 65 20 66 6f 6c 6c 6f |f the pa|ge follo|
|00000420| 77 69 6e 67 20 74 68 65 | 20 69 6e 64 65 78 65 64 |wing the| indexed|
|00000430| 20 70 61 67 65 09 09 7c | 0d 20 20 09 7c 09 09 09 | page..||. .|...|
|00000440| 09 09 09 09 69 73 20 70 | 68 79 73 69 63 61 6c 6c |....is p|hysicall|
|00000450| 79 20 63 6f 6e 74 69 67 | 75 6f 75 73 20 74 6f 20 |y contig|uous to |
|00000460| 74 68 65 20 61 72 67 75 | 6d 65 6e 74 20 70 61 67 |the argu|ment pag|
|00000470| 65 2e 20 54 68 69 73 20 | 69 73 09 7c 0d 20 20 09 |e. This |is.|. .|
|00000480| 7c 09 09 09 09 09 09 09 | 75 73 65 64 20 74 6f 20 ||.......|used to |
|00000490| 62 75 69 6c 64 20 74 68 | 65 20 6c 6f 6e 67 65 73 |build th|e longes|
|000004a0| 74 2d 70 6f 73 73 69 62 | 6c 65 20 44 4d 41 20 72 |t-possib|le DMA r|
|000004b0| 65 71 75 65 73 74 2e 09 | 09 09 7c 0d 20 20 09 7c |equest..|..|. .||
|000004c0| 09 47 65 74 4d 61 70 45 | 6e 74 72 79 43 6f 75 6e |.GetMapE|ntryCoun|
|000004d0| 74 09 09 47 69 76 65 6e | 20 61 20 6c 6f 67 69 63 |t..Given| a logic|
|000004e0| 61 6c 20 61 64 64 72 65 | 73 73 20 61 6e 64 20 61 |al addre|ss and a|
|000004f0| 72 65 61 20 6c 65 6e 67 | 74 68 2c 20 72 65 74 75 |rea leng|th, retu|
|00000500| 72 6e 20 74 68 65 09 09 | 7c 0d 20 20 09 7c 09 09 |rn the..||. .|..|
|00000510| 09 09 09 09 09 6e 75 6d | 62 65 72 20 6f 66 20 70 |.....num|ber of p|
|00000520| 68 79 73 69 63 61 6c 20 | 6d 61 70 20 65 6e 74 72 |hysical |map entr|
|00000530| 69 65 73 20 74 68 61 74 | 20 77 69 6c 6c 20 62 65 |ies that| will be|
|00000540| 20 6e 65 65 64 65 64 2e | 09 09 7c 0d 20 20 09 7c | needed.|..|. .||
|00000550| 09 4e 65 78 74 50 61 67 | 65 42 61 73 65 41 64 64 |.NextPag|eBaseAdd|
|00000560| 72 65 73 73 09 09 52 65 | 74 75 72 6e 20 74 68 65 |ress..Re|turn the|
|00000570| 20 62 61 73 65 20 6f 66 | 20 74 68 65 20 70 68 79 | base of| the phy|
|00000580| 73 69 63 61 6c 20 70 61 | 67 65 20 66 6f 6c 6c 6f |sical pa|ge follo|
|00000590| 77 69 6e 67 20 74 68 65 | 09 09 7c 0d 20 20 09 7c |wing the|..|. .||
|000005a0| 09 09 09 09 09 09 09 61 | 72 67 75 6d 65 6e 74 20 |.......a|rgument |
|000005b0| 70 68 79 73 69 63 61 6c | 20 61 64 64 72 65 73 73 |physical| address|
|000005c0| 2e 20 54 68 69 73 20 69 | 73 20 6e 65 65 64 65 64 |. This i|s needed|
|000005d0| 20 74 6f 20 64 65 74 65 | 72 6d 69 6e 65 09 7c 0d | to dete|rmine.|.|
|000005e0| 20 20 09 7c 09 09 09 09 | 09 09 09 63 6f 6e 74 69 | .|....|...conti|
|000005f0| 67 75 6f 75 73 20 70 68 | 79 73 69 63 61 6c 20 6d |guous ph|ysical m|
|00000600| 61 70 70 69 6e 67 73 2e | 20 49 74 20 63 6f 75 6c |appings.| It coul|
|00000610| 64 20 62 65 20 61 20 6d | 61 63 72 6f 2e 09 09 7c |d be a m|acro...||
|00000620| 0d 20 20 09 7c 09 50 61 | 67 65 42 61 73 65 41 64 |. .|.Pa|geBaseAd|
|00000630| 64 72 65 73 73 09 09 09 | 52 65 74 75 72 6e 20 74 |dress...|Return t|
|00000640| 68 65 20 62 61 73 65 20 | 6f 66 20 74 68 65 20 70 |he base |of the p|
|00000650| 68 79 73 69 63 61 6c 20 | 70 61 67 65 20 63 6f 6e |hysical |page con|
|00000660| 74 61 69 6e 69 6e 67 20 | 74 68 69 73 09 7c 0d 20 |taining |this.|. |
|00000670| 20 09 7c 09 09 09 09 09 | 09 09 61 64 64 72 65 73 | .|.....|..addres|
|00000680| 73 20 28 77 68 69 63 68 | 20 6d 61 79 20 62 65 20 |s (which| may be |
|00000690| 61 20 6c 6f 67 69 63 61 | 6c 20 6f 72 20 70 68 79 |a logica|l or phy|
|000006a0| 73 69 63 61 6c 20 61 64 | 64 72 65 73 73 29 2e 09 |sical ad|dress)..|
|000006b0| 7c 0d 20 20 09 7c 09 09 | 09 09 09 09 09 54 68 69 ||. .|..|.....Thi|
|000006c0| 73 20 63 6f 75 6c 64 20 | 62 65 20 61 20 6d 61 63 |s could |be a mac|
|000006d0| 72 6f 2e 09 09 09 09 09 | 09 09 09 09 7c 0d 20 20 |ro......|....|. |
|000006e0| 09 7c 09 43 6c 65 61 72 | 4d 65 6d 6f 72 79 09 09 |.|.Clear|Memory..|
|000006f0| 09 09 41 20 67 65 6e 65 | 72 61 6c 20 73 75 62 72 |..A gene|ral subr|
|00000700| 6f 75 74 69 6e 65 20 74 | 6f 20 63 6c 65 61 72 20 |outine t|o clear |
|00000710| 61 20 62 6c 6f 63 6b 20 | 6f 66 20 6d 65 6d 6f 72 |a block |of memor|
|00000720| 79 2e 20 49 74 09 09 7c | 0d 20 20 09 7c 09 09 09 |y. It..||. .|...|
|00000730| 09 09 09 09 74 72 69 65 | 73 20 74 6f 20 62 65 20 |....trie|s to be |
|00000740| 65 66 66 69 63 69 65 6e | 74 2e 09 09 09 09 09 09 |efficien|t.......|
|00000750| 09 09 09 7c 0d 09 2e 5f | 5f 5f 5f 5f 5f 5f 5f 5f |...|..._|________|
|00000760| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00000770| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00000780| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00000790| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|000007a0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 2e 0d 2a 2f 0d 23 |________|__..*/.#|
|000007b0| 69 6e 63 6c 75 64 65 20 | 22 4e 43 52 44 72 69 76 |include |"NCRDriv|
|000007c0| 65 72 50 72 69 76 61 74 | 65 2e 68 22 0d 0d 2f 2a |erPrivat|e.h"../*|
|000007d0| 0d 20 2a 20 54 68 69 73 | 20 69 73 20 61 20 73 6c |. * This| is a sl|
|000007e0| 69 67 68 74 6c 79 20 73 | 61 66 65 72 20 76 65 72 |ightly s|afer ver|
|000007f0| 73 69 6f 6e 20 6f 66 20 | 43 68 65 63 6b 70 6f 69 |sion of |Checkpoi|
|00000800| 6e 74 49 4f 20 74 68 61 | 74 20 77 69 6c 6c 20 69 |ntIO tha|t will i|
|00000810| 6e 76 61 6c 69 64 61 74 | 65 20 74 68 65 0d 20 2a |nvalidat|e the. *|
|00000820| 20 70 72 65 70 61 72 61 | 74 69 6f 6e 49 44 20 61 | prepara|tionID a|
|00000830| 66 74 65 72 20 69 74 20 | 63 6f 6d 70 6c 65 74 65 |fter it |complete|
|00000840| 73 2c 20 61 6e 64 20 77 | 69 6c 6c 20 6e 6f 74 20 |s, and w|ill not |
|00000850| 63 61 6c 6c 20 43 68 65 | 63 6b 70 6f 69 6e 74 49 |call Che|ckpointI|
|00000860| 4f 20 69 66 20 74 68 65 | 0d 20 2a 20 70 72 65 70 |O if the|. * prep|
|00000870| 61 72 61 74 69 6f 6e 49 | 44 20 69 73 20 61 6c 72 |arationI|D is alr|
|00000880| 65 61 64 79 20 69 6e 76 | 61 6c 69 64 2e 0d 20 2a |eady inv|alid.. *|
|00000890| 2f 0d 76 6f 69 64 0d 43 | 68 65 63 6b 70 6f 69 6e |/.void.C|heckpoin|
|000008a0| 74 49 4f 54 61 62 6c 65 | 28 0d 09 09 49 4f 50 72 |tIOTable|(...IOPr|
|000008b0| 65 70 61 72 61 74 69 6f | 6e 54 61 62 6c 65 09 09 |eparatio|nTable..|
|000008c0| 2a 69 6f 54 61 62 6c 65 | 0d 0d 09 29 0d 7b 0d 09 |*ioTable|...).{..|
|000008d0| 09 4f 53 53 74 61 74 75 | 73 09 09 09 09 6f 73 53 |.OSStatu|s....osS|
|000008e0| 74 61 74 75 73 3b 0d 09 | 09 49 4f 50 72 65 70 61 |tatus;..|.IOPrepa|
|000008f0| 72 61 74 69 6f 6e 49 44 | 09 09 09 70 72 65 70 61 |rationID|...prepa|
|00000900| 72 61 74 69 6f 6e 49 44 | 3b 0d 0d 09 09 54 72 61 |rationID|;....Tra|
|00000910| 63 65 28 43 68 65 63 6b | 70 6f 69 6e 74 49 4f 54 |ce(Check|pointIOT|
|00000920| 61 62 6c 65 29 3b 0d 09 | 09 77 68 69 6c 65 20 28 |able);..|.while (|
|00000930| 28 70 72 65 70 61 72 61 | 74 69 6f 6e 49 44 20 3d |(prepara|tionID =|
|00000940| 20 69 6f 54 61 62 6c 65 | 2d 3e 70 72 65 70 61 72 | ioTable|->prepar|
|00000950| 61 74 69 6f 6e 49 44 29 | 20 21 3d 20 6b 49 6e 76 |ationID)| != kInv|
|00000960| 61 6c 69 64 49 44 29 20 | 7b 0d 09 09 09 69 66 20 |alidID) |{....if |
|00000970| 28 43 6f 6d 70 61 72 65 | 41 6e 64 53 77 61 70 28 |(Compare|AndSwap(|
|00000980| 0d 09 09 09 09 09 28 55 | 49 6e 74 33 32 29 20 70 |......(U|Int32) p|
|00000990| 72 65 70 61 72 61 74 69 | 6f 6e 49 44 2c 20 6b 49 |reparati|onID, kI|
|000009a0| 6e 76 61 6c 69 64 49 44 | 2c 20 28 55 49 6e 74 33 |nvalidID|, (UInt3|
|000009b0| 32 20 2a 29 20 26 69 6f | 54 61 62 6c 65 2d 3e 70 |2 *) &io|Table->p|
|000009c0| 72 65 70 61 72 61 74 69 | 6f 6e 49 44 29 29 20 7b |reparati|onID)) {|
|000009d0| 0d 09 09 09 09 6f 73 53 | 74 61 74 75 73 20 3d 20 |.....osS|tatus = |
|000009e0| 43 68 65 63 6b 70 6f 69 | 6e 74 49 4f 28 70 72 65 |Checkpoi|ntIO(pre|
|000009f0| 70 61 72 61 74 69 6f 6e | 49 44 2c 20 6b 4e 69 6c |paration|ID, kNil|
|00000a00| 4f 70 74 69 6f 6e 73 29 | 3b 0d 09 09 09 09 43 68 |Options)|;.....Ch|
|00000a10| 65 63 6b 53 74 61 74 75 | 73 28 6f 73 53 74 61 74 |eckStatu|s(osStat|
|00000a20| 75 73 2c 20 22 5c 70 43 | 68 65 63 6b 70 6f 69 6e |us, "\pC|heckpoin|
|00000a30| 74 49 4f 22 29 3b 0d 09 | 09 09 09 62 72 65 61 6b |tIO");..|...break|
|00000a40| 3b 0d 09 09 09 7d 20 2f | 2a 20 49 66 20 43 6f 6d |;....} /|* If Com|
|00000a50| 70 61 72 65 41 6e 64 53 | 77 61 70 20 73 75 63 63 |pareAndS|wap succ|
|00000a60| 65 65 64 73 20 2a 2f 0d | 09 09 7d 20 2f 2a 20 43 |eeds */.|..} /* C|
|00000a70| 6f 6e 63 75 72 72 65 6e | 74 20 61 63 63 65 73 73 |oncurren|t access|
|00000a80| 20 6c 6f 6f 70 20 2a 2f | 0d 7d 0d 0d 0d 2f 2a 0d | loop */|.}.../*.|
|00000a90| 20 2a 20 54 68 69 73 20 | 6c 6f 6f 6b 73 20 61 74 | * This |looks at|
|00000aa0| 20 74 68 65 20 70 68 79 | 73 69 63 61 6c 20 6d 61 | the phy|sical ma|
|00000ab0| 70 70 69 6e 67 20 74 61 | 62 6c 65 20 74 6f 20 65 |pping ta|ble to e|
|00000ac0| 6e 73 75 72 65 20 74 68 | 61 74 20 74 68 65 20 70 |nsure th|at the p|
|00000ad0| 68 79 73 69 63 61 6c 20 | 61 72 65 61 0d 20 2a 20 |hysical |area. * |
|00000ae0| 69 73 20 63 6f 6e 74 69 | 67 75 6f 75 73 2e 20 54 |is conti|guous. T|
|00000af0| 68 65 20 73 63 72 69 70 | 74 20 61 6e 64 20 70 65 |he scrip|t and pe|
|00000b00| 72 2d 72 65 71 75 65 73 | 74 20 74 61 62 6c 65 73 |r-reques|t tables|
|00000b10| 20 6d 75 73 74 20 62 65 | 20 63 6f 6e 74 69 67 75 | must be| contigu|
|00000b20| 6f 75 73 20 61 6e 64 20 | 74 68 65 20 64 72 69 76 |ous and |the driv|
|00000b30| 65 72 0d 20 2a 20 77 69 | 6c 6c 20 66 61 69 6c 20 |er. * wi|ll fail |
|00000b40| 74 6f 20 69 6e 69 74 69 | 61 6c 69 7a 65 20 69 66 |to initi|alize if|
|00000b50| 20 74 68 69 73 20 69 73 | 20 6e 6f 74 20 74 68 65 | this is| not the|
|00000b60| 20 63 61 73 65 2e 0d 20 | 2a 2f 0d 4f 53 45 72 72 | case.. |*/.OSErr|
|00000b70| 0d 43 68 65 63 6b 46 6f | 72 43 6f 6e 74 69 67 75 |.CheckFo|rContigu|
|00000b80| 6f 75 73 50 68 79 73 69 | 63 61 6c 4d 61 70 70 69 |ousPhysi|calMappi|
|00000b90| 6e 67 28 0d 09 09 63 6f | 6e 73 74 20 49 4f 50 72 |ng(...co|nst IOPr|
|00000ba0| 65 70 61 72 61 74 69 6f | 6e 54 61 62 6c 65 20 2a |eparatio|nTable *|
|00000bb0| 69 6f 54 61 62 6c 65 0d | 09 29 0d 7b 0d 09 09 49 |ioTable.|.).{...I|
|00000bc0| 74 65 6d 43 6f 75 6e 74 | 09 09 09 09 69 3b 0d 09 |temCount|....i;..|
|00000bd0| 09 4f 53 45 72 72 09 09 | 09 09 09 73 74 61 74 75 |.OSErr..|...statu|
|00000be0| 73 3b 0d 09 09 0d 09 09 | 2f 2f 2a 2a 20 54 72 61 |s;......|//** Tra|
|00000bf0| 63 65 28 43 68 65 63 6b | 46 6f 72 43 6f 6e 74 69 |ce(Check|ForConti|
|00000c00| 67 75 6f 75 73 50 68 79 | 73 69 63 61 6c 4d 61 70 |guousPhy|sicalMap|
|00000c10| 70 69 6e 67 29 3b 0d 09 | 09 73 74 61 74 75 73 20 |ping);..|.status |
|00000c20| 3d 20 6e 6f 45 72 72 3b | 0d 09 09 66 6f 72 20 28 |= noErr;|...for (|
|00000c30| 69 20 3d 20 30 3b 20 69 | 20 3c 20 69 6f 54 61 62 |i = 0; i| < ioTab|
|00000c40| 6c 65 2d 3e 6d 61 70 70 | 69 6e 67 45 6e 74 72 79 |le->mapp|ingEntry|
|00000c50| 43 6f 75 6e 74 20 2d 20 | 31 3b 20 69 2b 2b 29 20 |Count - |1; i++) |
|00000c60| 7b 0d 09 09 09 69 66 20 | 28 4e 65 78 74 50 61 67 |{....if |(NextPag|
|00000c70| 65 49 73 43 6f 6e 74 69 | 67 75 6f 75 73 28 69 6f |eIsConti|guous(io|
|00000c80| 54 61 62 6c 65 2d 3e 70 | 68 79 73 69 63 61 6c 4d |Table->p|hysicalM|
|00000c90| 61 70 70 69 6e 67 2c 20 | 69 29 20 3d 3d 20 46 41 |apping, |i) == FA|
|00000ca0| 4c 53 45 29 20 7b 0d 09 | 09 09 09 73 74 61 74 75 |LSE) {..|...statu|
|00000cb0| 73 20 3d 20 70 61 72 61 | 6d 45 72 72 3b 0d 09 09 |s = para|mErr;...|
|00000cc0| 09 09 62 72 65 61 6b 3b | 0d 09 09 09 7d 0d 09 09 |..break;|....}...|
|00000cd0| 7d 0d 09 09 43 68 65 63 | 6b 53 74 61 74 75 73 28 |}...Chec|kStatus(|
|00000ce0| 73 74 61 74 75 73 2c 20 | 22 5c 70 4e 6f 6e 2d 63 |status, |"\pNon-c|
|00000cf0| 6f 6e 74 69 67 75 6f 75 | 73 20 70 68 79 73 69 63 |ontiguou|s physic|
|00000d00| 61 6c 20 6d 61 70 70 69 | 6e 67 22 29 3b 0d 23 69 |al mappi|ng");.#i|
|00000d10| 66 20 30 0d 09 09 4c 6f | 67 4d 65 6d 6f 72 79 28 |f 0...Lo|gMemory(|
|00000d20| 0d 09 09 09 26 69 6f 54 | 61 62 6c 65 2d 3e 70 68 |....&ioT|able->ph|
|00000d30| 79 73 69 63 61 6c 4d 61 | 70 70 69 6e 67 5b 30 5d |ysicalMa|pping[0]|
|00000d40| 2c 0d 09 09 09 69 6f 54 | 61 62 6c 65 2d 3e 6d 61 |,....ioT|able->ma|
|00000d50| 70 70 69 6e 67 45 6e 74 | 72 79 43 6f 75 6e 74 20 |ppingEnt|ryCount |
|00000d60| 2a 20 73 69 7a 65 6f 66 | 20 28 50 68 79 73 69 63 |* sizeof| (Physic|
|00000d70| 61 6c 41 64 64 72 65 73 | 73 29 0d 09 09 29 3b 0d |alAddres|s)...);.|
|00000d80| 23 65 6e 64 69 66 0d 09 | 09 72 65 74 75 72 6e 20 |#endif..|.return |
|00000d90| 28 73 74 61 74 75 73 29 | 3b 0d 7d 0d 0d 2f 2a 0d |(status)|;.}../*.|
|00000da0| 20 2a 20 52 65 74 75 72 | 6e 20 74 68 65 20 6e 75 | * Retur|n the nu|
|00000db0| 6d 62 65 72 20 6f 66 20 | 6d 61 70 70 69 6e 67 20 |mber of |mapping |
|00000dc0| 74 61 62 6c 65 73 20 74 | 68 61 74 20 74 68 69 73 |tables t|hat this|
|00000dd0| 20 61 72 65 61 20 77 69 | 6c 6c 20 72 65 71 75 69 | area wi|ll requi|
|00000de0| 72 65 2e 20 54 68 65 72 | 65 20 69 73 20 6f 6e 65 |re. Ther|e is one|
|00000df0| 20 65 6e 74 72 79 0d 20 | 2a 20 70 65 72 20 70 61 | entry. |* per pa|
|00000e00| 67 65 2e 20 54 68 75 73 | 20 74 68 65 20 72 65 73 |ge. Thus| the res|
|00000e10| 75 6c 74 20 69 73 20 74 | 68 65 20 6e 75 6d 62 65 |ult is t|he numbe|
|00000e20| 72 20 6f 66 20 64 69 73 | 74 69 6e 63 74 20 70 61 |r of dis|tinct pa|
|00000e30| 67 65 73 20 69 6e 20 74 | 68 65 20 61 72 65 61 2e |ges in t|he area.|
|00000e40| 20 61 72 65 61 4c 65 6e | 67 74 68 0d 20 2a 20 73 | areaLen|gth. * s|
|00000e50| 68 6f 75 6c 64 20 6e 6f | 74 20 62 65 20 7a 65 72 |hould no|t be zer|
|00000e60| 6f 2e 0d 20 2a 2f 0d 49 | 74 65 6d 43 6f 75 6e 74 |o.. */.I|temCount|
|00000e70| 0d 47 65 74 4d 61 70 45 | 6e 74 72 79 43 6f 75 6e |.GetMapE|ntryCoun|
|00000e80| 74 28 0d 09 09 76 6f 69 | 64 09 09 09 09 09 2a 61 |t(...voi|d.....*a|
|00000e90| 72 65 61 42 61 73 65 41 | 64 64 72 65 73 73 2c 0d |reaBaseA|ddress,.|
|00000ea0| 09 09 42 79 74 65 43 6f | 75 6e 74 09 09 09 09 61 |..ByteCo|unt....a|
|00000eb0| 72 65 61 4c 65 6e 67 74 | 68 0d 09 29 0d 7b 0d 09 |reaLengt|h..).{..|
|00000ec0| 09 49 74 65 6d 43 6f 75 | 6e 74 09 09 09 09 72 65 |.ItemCou|nt....re|
|00000ed0| 73 75 6c 74 3b 0d 09 09 | 42 79 74 65 43 6f 75 6e |sult;...|ByteCoun|
|00000ee0| 74 09 09 09 09 6e 6f 72 | 6d 61 6c 69 7a 65 64 4c |t....nor|malizedL|
|00000ef0| 65 6e 67 74 68 3b 0d 09 | 09 55 49 6e 74 33 32 09 |ength;..|.UInt32.|
|00000f00| 09 09 09 09 61 72 65 61 | 41 64 64 72 65 73 73 3b |....area|Address;|
|00000f10| 0d 09 09 0d 09 09 2f 2f | 2a 2a 20 54 72 61 63 65 |......//|** Trace|
|00000f20| 28 47 65 74 4d 61 70 45 | 6e 74 72 79 43 6f 75 6e |(GetMapE|ntryCoun|
|00000f30| 74 29 3b 0d 09 09 61 72 | 65 61 41 64 64 72 65 73 |t);...ar|eaAddres|
|00000f40| 73 20 3d 20 28 55 49 6e | 74 33 32 29 20 61 72 65 |s = (UIn|t32) are|
|00000f50| 61 42 61 73 65 41 64 64 | 72 65 73 73 3b 0d 09 09 |aBaseAdd|ress;...|
|00000f60| 6e 6f 72 6d 61 6c 69 7a | 65 64 4c 65 6e 67 74 68 |normaliz|edLength|
|00000f70| 20 3d 20 50 61 67 65 42 | 61 73 65 41 64 64 72 65 | = PageB|aseAddre|
|00000f80| 73 73 28 61 72 65 61 41 | 64 64 72 65 73 73 20 2b |ss(areaA|ddress +|
|00000f90| 20 61 72 65 61 4c 65 6e | 67 74 68 20 2d 20 31 29 | areaLen|gth - 1)|
|00000fa0| 0d 09 09 09 09 09 09 20 | 2d 20 50 61 67 65 42 61 |....... |- PageBa|
|00000fb0| 73 65 41 64 64 72 65 73 | 73 28 61 72 65 61 41 64 |seAddres|s(areaAd|
|00000fc0| 64 72 65 73 73 29 3b 0d | 09 09 72 65 73 75 6c 74 |dress);.|..result|
|00000fd0| 20 3d 20 28 49 74 65 6d | 43 6f 75 6e 74 29 20 28 | = (Item|Count) (|
|00000fe0| 6e 6f 72 6d 61 6c 69 7a | 65 64 4c 65 6e 67 74 68 |normaliz|edLength|
|00000ff0| 20 2f 20 67 50 61 67 65 | 53 69 7a 65 29 20 2b 20 | / gPage|Size) + |
|00001000| 31 3b 0d 23 69 66 20 30 | 20 26 26 20 55 53 45 5f |1;.#if 0| && USE_|
|00001010| 4c 4f 47 5f 4c 49 42 52 | 41 52 59 0d 09 09 57 72 |LOG_LIBR|ARY...Wr|
|00001020| 69 74 65 4c 6f 67 45 6e | 74 72 79 28 47 4c 4f 42 |iteLogEn|try(GLOB|
|00001030| 41 4c 2e 6c 6f 67 52 65 | 63 6f 72 64 50 74 72 2c |AL.logRe|cordPtr,|
|00001040| 20 27 47 4d 61 70 27 2c | 0d 09 09 09 4c 6f 67 46 | 'GMap',|....LogF|
|00001050| 6f 72 6d 61 74 35 28 6b | 4c 6f 67 46 6f 72 6d 61 |ormat5(k|LogForma|
|00001060| 74 41 64 64 72 65 73 73 | 2c 20 6b 4c 6f 67 46 6f |tAddress|, kLogFo|
|00001070| 72 6d 61 74 55 6e 73 69 | 67 6e 65 64 2c 0d 09 09 |rmatUnsi|gned,...|
|00001080| 09 09 6b 4c 6f 67 46 6f | 72 6d 61 74 55 6e 73 69 |..kLogFo|rmatUnsi|
|00001090| 67 6e 65 64 2c 20 6b 4c | 6f 67 46 6f 72 6d 61 74 |gned, kL|ogFormat|
|000010a0| 55 6e 73 69 67 6e 65 64 | 2c 20 6b 4c 6f 67 46 6f |Unsigned|, kLogFo|
|000010b0| 72 6d 61 74 53 74 72 69 | 6e 67 29 2c 0d 09 09 09 |rmatStri|ng),....|
|000010c0| 28 55 49 6e 74 33 32 29 | 20 61 72 65 61 42 61 73 |(UInt32)| areaBas|
|000010d0| 65 41 64 64 72 65 73 73 | 2c 0d 09 09 09 28 55 49 |eAddress|,....(UI|
|000010e0| 6e 74 33 32 29 20 61 72 | 65 61 4c 65 6e 67 74 68 |nt32) ar|eaLength|
|000010f0| 2c 0d 09 09 09 28 55 49 | 6e 74 33 32 29 20 6e 6f |,....(UI|nt32) no|
|00001100| 72 6d 61 6c 69 7a 65 64 | 4c 65 6e 67 74 68 2c 0d |rmalized|Length,.|
|00001110| 09 09 09 28 55 49 6e 74 | 33 32 29 20 72 65 73 75 |...(UInt|32) resu|
|00001120| 6c 74 2c 0d 09 09 09 22 | 5c 70 47 65 74 4d 61 70 |lt,...."|\pGetMap|
|00001130| 41 72 65 61 43 6f 75 6e | 74 22 0d 09 09 29 3b 0d |AreaCoun|t"...);.|
|00001140| 23 65 6e 64 69 66 0d 09 | 09 72 65 74 75 72 6e 20 |#endif..|.return |
|00001150| 28 72 65 73 75 6c 74 29 | 3b 0d 7d 0d 0d 2f 2a 0d |(result)|;.}../*.|
|00001160| 20 2a 20 43 6c 65 61 72 | 20 61 20 62 6c 6f 63 6b | * Clear| a block|
|00001170| 20 6f 66 20 6d 65 6d 6f | 72 79 2e 20 54 68 69 73 | of memo|ry. This|
|00001180| 20 69 73 20 6f 70 74 69 | 6d 69 7a 65 64 20 74 6f | is opti|mized to|
|00001190| 20 75 73 65 20 6c 6f 6e | 67 77 6f 72 64 20 61 63 | use lon|gword ac|
|000011a0| 63 65 73 73 20 77 68 65 | 6e 65 76 65 72 20 70 6f |cess whe|never po|
|000011b0| 73 73 69 62 6c 65 2e 0d | 20 2a 2f 0d 76 6f 69 64 |ssible..| */.void|
|000011c0| 0d 43 6c 65 61 72 4d 65 | 6d 6f 72 79 28 0d 09 09 |.ClearMe|mory(...|
|000011d0| 76 6f 69 64 09 09 09 09 | 09 2a 61 72 65 61 41 64 |void....|.*areaAd|
|000011e0| 64 72 65 73 73 2c 0d 09 | 09 72 65 67 69 73 74 65 |dress,..|.registe|
|000011f0| 72 20 53 69 7a 65 09 09 | 09 62 79 74 65 43 6f 75 |r Size..|.byteCou|
|00001200| 6e 74 0d 09 29 0d 7b 0d | 09 09 72 65 67 69 73 74 |nt..).{.|..regist|
|00001210| 65 72 20 55 49 6e 74 38 | 09 09 09 2a 62 79 74 65 |er UInt8|...*byte|
|00001220| 50 74 72 3b 0d 23 64 65 | 66 69 6e 65 20 6b 57 6f |Ptr;.#de|fine kWo|
|00001230| 72 64 53 69 7a 65 09 28 | 73 69 7a 65 6f 66 20 28 |rdSize.(|sizeof (|
|00001240| 55 49 6e 74 33 32 29 29 | 0d 23 64 65 66 69 6e 65 |UInt32))|.#define|
|00001250| 20 6b 57 6f 72 64 4d 61 | 73 6b 09 28 6b 57 6f 72 | kWordMa|sk.(kWor|
|00001260| 64 53 69 7a 65 20 2d 20 | 31 29 0d 0d 09 09 2f 2f |dSize - |1)....//|
|00001270| 2a 2a 20 54 72 61 63 65 | 28 43 6c 65 61 72 4d 65 |** Trace|(ClearMe|
|00001280| 6d 6f 72 79 29 3b 0d 09 | 09 62 79 74 65 50 74 72 |mory);..|.bytePtr|
|00001290| 20 3d 20 28 55 49 6e 74 | 38 20 2a 29 20 61 72 65 | = (UInt|8 *) are|
|000012a0| 61 41 64 64 72 65 73 73 | 3b 0d 09 09 77 68 69 6c |aAddress|;...whil|
|000012b0| 65 20 28 28 28 28 55 49 | 6e 74 33 32 29 20 62 79 |e ((((UI|nt32) by|
|000012c0| 74 65 50 74 72 29 20 26 | 20 6b 57 6f 72 64 4d 61 |tePtr) &| kWordMa|
|000012d0| 73 6b 29 20 21 3d 20 30 | 20 26 26 20 62 79 74 65 |sk) != 0| && byte|
|000012e0| 43 6f 75 6e 74 20 3e 20 | 30 29 20 7b 0d 09 09 09 |Count > |0) {....|
|000012f0| 2a 62 79 74 65 50 74 72 | 2b 2b 20 3d 20 30 3b 0d |*bytePtr|++ = 0;.|
|00001300| 09 09 09 2d 2d 62 79 74 | 65 43 6f 75 6e 74 3b 0d |...--byt|eCount;.|
|00001310| 09 09 7d 0d 09 09 77 68 | 69 6c 65 20 28 62 79 74 |..}...wh|ile (byt|
|00001320| 65 43 6f 75 6e 74 20 3e | 3d 20 6b 57 6f 72 64 53 |eCount >|= kWordS|
|00001330| 69 7a 65 29 20 7b 0d 09 | 09 09 2a 28 28 55 49 6e |ize) {..|..*((UIn|
|00001340| 74 33 32 20 2a 29 20 62 | 79 74 65 50 74 72 29 20 |t32 *) b|ytePtr) |
|00001350| 3d 20 30 3b 0d 09 09 09 | 62 79 74 65 50 74 72 20 |= 0;....|bytePtr |
|00001360| 2b 3d 20 6b 57 6f 72 64 | 53 69 7a 65 3b 0d 09 09 |+= kWord|Size;...|
|00001370| 09 62 79 74 65 43 6f 75 | 6e 74 20 2d 3d 20 6b 57 |.byteCou|nt -= kW|
|00001380| 6f 72 64 53 69 7a 65 3b | 0d 09 09 7d 0d 09 09 77 |ordSize;|...}...w|
|00001390| 68 69 6c 65 20 28 62 79 | 74 65 43 6f 75 6e 74 20 |hile (by|teCount |
|000013a0| 3e 20 30 29 20 7b 0d 09 | 09 09 2a 62 79 74 65 50 |> 0) {..|..*byteP|
|000013b0| 74 72 2b 2b 20 3d 20 30 | 3b 0d 09 09 09 2d 2d 62 |tr++ = 0|;....--b|
|000013c0| 79 74 65 43 6f 75 6e 74 | 3b 0d 09 09 7d 0d 23 75 |yteCount|;...}.#u|
|000013d0| 6e 64 65 66 20 6b 57 6f | 72 64 53 69 7a 65 0d 23 |ndef kWo|rdSize.#|
|000013e0| 75 6e 64 65 66 20 6b 57 | 6f 72 64 4d 61 78 0d 7d |undef kW|ordMax.}|
|000013f0| 0d 0d 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001400| 00 00 01 00 00 00 01 54 | 00 00 00 54 00 00 00 46 |.......T|...T...F|
|00001410| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001430| 15 50 72 65 70 4d 65 6d | 6f 72 79 55 74 69 6c 69 |.PrepMem|oryUtili|
|00001440| 74 69 65 73 2e 63 02 00 | 00 00 54 45 58 54 4d 50 |ties.c..|..TEXTMP|
|00001450| 00 00 54 45 58 54 4d 50 | 43 43 01 00 00 64 00 00 |..TEXTMP|CC...d..|
|00001460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001470| 00 00 ab 87 97 69 00 00 | 13 72 00 00 01 9a 00 00 |.....i..|.r......|
|00001480| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001490| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000014a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000014b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000014c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000014d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000014e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000014f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001500| 00 00 00 48 00 0a 43 6f | 75 72 69 65 72 00 00 00 |...H..Co|urier...|
|00001510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001520| 00 00 00 00 00 00 00 03 | 00 04 00 64 00 9b 01 bb |........|...d....|
|00001530| 02 fa 00 64 00 9b 01 bb | 02 fa ac 18 91 dd 00 00 |...d....|........|
|00001540| 0f 73 00 00 0f 7c 00 00 | 0e 03 01 00 00 00 00 04 |.s...|..|........|
|00001550| 00 01 00 01 00 00 01 00 | 00 00 01 54 00 00 00 54 |........|...T...T|
|00001560| 00 00 00 46 01 b9 15 38 | 12 5e 00 00 00 1c 00 46 |...F...8|.^.....F|
|00001570| 00 01 4d 50 53 52 00 00 | 00 12 4d 57 42 42 00 00 |..MPSR..|..MWBB..|
|00001580| 00 1e 03 ed ff ff 00 00 | 00 00 00 00 00 00 03 f0 |........|........|
|00001590| ff ff 00 00 00 4c 00 00 | 00 00 00 00 00 00 00 00 |.....L..|........|
|000015a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000015b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000015c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000015d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000015e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000015f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+